﻿namespace Iterator
{
    /// <summary>
    /// 迭代器接口
    /// </summary>
    public interface Iterator
    {
        /// <summary>
        /// 获取第一个对象
        /// </summary>
        /// <returns></returns>
        object First();
        /// <summary>
        /// 获取下一个对象
        /// </summary>
        /// <returns></returns>
        object Next();
        /// <summary>
        /// 是否循环完毕
        /// </summary>
        /// <returns></returns>
        bool IsDone();
        /// <summary>
        /// 获取当前对象
        /// </summary>
        /// <returns></returns>
        object CurrentItem();
    }
}
